package com.googlecode.jtoy.patterns.proxy;

/**
 * 通知实现
 * 
 * @author shangxj
 * @date Jun 19, 2011 12:03:06 AM
 */
public class AdviceImpl implements Advice {

	@Override
	public void after() {

		System.out.println("AdviceImpl.after() ==> after (finally)...");
	}

	@Override
	public void before() {

		System.out.println("AdviceImpl.before() ==> before method...");

	}

	@Override
	public void afterException() {

		System.out.println("AdviceImpl.afterException() ==> after exception...");

	}

	@Override
	public void afterReturn() {

		System.out.println("AdviceImpl.afterReturn() ==> after return...");

	}

	@Override
	public boolean around(Object too) {

		if (too == null) {
			System.out.println("AdviceImpl.around() ==> around : false...");
			return false;
		}

		System.out.println("AdviceImpl.around() ==> around : true...");
		return true;
	}

}
